package edu.ccut.titan.tag.report.chart.dataset;

import net.sf.jasperreports.charts.design.JRDesignXyDataset;
import net.sf.jasperreports.charts.design.JRDesignXySeries;
import net.sf.jasperreports.engine.JRChartDataset;
import net.sf.jasperreports.engine.JRExpression;
import net.sf.jasperreports.engine.design.JRDesignExpression;
import edu.ccut.titan.tag.report.design.ChartsInfo;

public class TitanXYDataset implements ITitanDataset {

	public JRChartDataset getDatasetContent(ChartsInfo chart) {
		JRDesignXyDataset designXyDataset = new JRDesignXyDataset(null);
		JRDesignXySeries xySeries = new JRDesignXySeries();
		JRDesignExpression xValueExpression = new JRDesignExpression();
		xySeries.setXValueExpression(xValueExpression);
		xValueExpression = new JRDesignExpression();
		JRDesignExpression seriesExpression = new JRDesignExpression();
		seriesExpression.setText("");
		xySeries.setSeriesExpression(seriesExpression);
		JRExpression yValueExpression = new JRDesignExpression();
		xySeries.setYValueExpression(yValueExpression);
		designXyDataset.addXySeries(xySeries);
		return designXyDataset;
	}

}
